<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		.outer {
			width: 500px;
			height: 500px;
			background-color: #ccc;
			border: 1px solid black;
			padding: 20px;
		}

		.inner {
			width: 100px;
			height: 100px;
			border: 1px solid black;
		}

		.item1 {
			background-color: red;
		}

		.item2 {
			background-color: green;
			/* 相对于 static 定位以外的第一个父元素进行定位 */
			position: absolute;
		}

		.item3 {
			background-color: blue;
		}
	</style>
</head>
<body>
	<div class="outer">
		<div class="inner item1">1</div>
		<div class="inner item2">2</div>
		<div class="inner item3">3</div>
	</div>
</body>
</html>